#!/usr/bin/env python
# -*- coding: utf-8 -*-
# datetime: 9/12/2023 下午1:39
# Author: name
# File: response_tepmlate.py
# ide: PyCharm
# description:

class ResponseCode:

    def __init__(self, name):
        self.name = name

    def response_404(self):
        return {
            "code": 404,
            "message": f"{self.name}未找到"
        }

    def response_delete(self):
        return {
            "code": 200,
            "message": f"编号为{self.name},删除成功"
        }

    def response_409(self):
        return {
            "code": 409,
            "message": f"{self.name},已存在,新增失败"
        }

    def response_add(self):
        return {
            "code": 200,
            "message": f"{self.name},新增成功"
        }

    def response_update_success(self):
        return {
            "code": 200,
            "message": f"{self.name},更新成功"
        }

    def response_exist(self):
        return {
            "code": 409,
            "message": f"{self.name},已存在,操作失败"
        }
